<template>
  <div class="myrest">
    <mt-header title="我的住院" fixed>
      <router-link to="/" slot="left">
        <mt-button icon="back"></mt-button>
      </router-link>
    </mt-header>
    <mt-cell title="当前就诊人"><span @click="popupVisible=!popupVisible">{{acctname}} <i class="mint-cell-allow-right righticon"></i></span></mt-cell>
    <div class="grayrow"></div>
    <mt-cell title="住院凭证">--</mt-cell>
    <mt-cell title="住院天数">--</mt-cell>
    <mt-cell title="入院日期">--</mt-cell>
    <mt-cell title="预交金">--</mt-cell>
    <mt-cell title="总费用">--</mt-cell>
    <mt-cell title="预交金余额">--</mt-cell>
    <mt-cell><span>暂无入院信息，如已住院，请<span class="clful" @click="$router.push('/Readd')"> 补录住院凭证 </span></span></mt-cell>
    <div class="grayrow"></div>
    <mt-cell title="预交金缴纳" isLink></mt-cell>
    <mt-cell title="每日清单" isLink></mt-cell>
    <mt-cell title="住院费用" isLink></mt-cell>
    <mt-popup
      v-model="popupVisible"
      position="bottom">
      <mt-picker :slots="slots" @change="onValuesChange"></mt-picker>
    </mt-popup>
  </div>
</template>

<script>
  export default {
    name: 'myrest',
    data () {
      return {
        popupVisible:false,
        acctname:'范臣臣',
        slots: [
          {
            flex: 1,
            values: ['范臣臣', '李冰冰'],
            className: 'slot1',
            textAlign: 'center'
          }
        ]
      }
    },
    methods: {
      onValuesChange(picker, values) {
        if(this.slots[0].values[0]==values){
          this.acctname = '范臣臣'
        }else{
          this.acctname = '李冰冰'
        }
      }
    },
    computed: {}
  }
</script>

